import { HIDE_MENU_LIST, SET_MENU_LIST_VISIBLE, SHOW_MENU_LIST } from '../constant';

const initValue = false;

export default function menuList (prev = initValue, action) {
  const { type, data } = action;
  switch (type) {
  case SET_MENU_LIST_VISIBLE:
    return data;
  case HIDE_MENU_LIST:
    return false;
  case SHOW_MENU_LIST:
    return true;
  default:
    return prev;
  }
}


